#include <iostream>
#include <cstdlib>
#include <algorithm>
#include <string>
using namespace std;

#ifndef HUGEINTEGER_H
#define HUGEINTEGER_H 

class HugeInteger {
public:
    HugeInteger (long = 0);
    HugeInteger (const char *);
    virtual ~HugeInteger ();

    HugeInteger add (const HugeInteger &);

    short& operator [] (int);
    short operator [] (int) const;
    size_t size () const;

    bool is_equal_to (const HugeInteger &) const;
    bool is_greater_than (const HugeInteger &) const;

    void input (const char *);
    void output () const;

private:
    void from_long (long);
    void from_string (const char *);

    enum {
        INTS_SIZE = 10
    };
    typedef short ints_t[INTS_SIZE];
    ints_t integer;
    mutable size_t integer_size;
};

#endif
